<PatchStore connectionStringBase="Data Source=%server%;Initial Catalog=%database%;Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;">  
  <Patches>
    <!-- Place patches here in reverse order, newest on top and older below. -->
    <Patch patchNumber="01.00.001" />
    <Patch patchNumber="01.00.002" />
  </Patches>

  <!-- Leave these settings the way they are unless you have a compelling reason to change them! -->
  <AppliedPatches>
    <!-- Determines how to find applied patches-->
    <SelectAppliedPatches>select PatchNumber, Description from dbo.AppliedPatch</SelectAppliedPatches>
    <!-- Determines how to add a new applied patches-->
    <AddAppliedPatch>
      insert dbo.AppliedPatch (PatchNumber, Description, AppliedBy, AppliedDate)
      values ('%patchNumber%', '%description%', SYSTEM_USER, GetDate())
    </AddAppliedPatch>
    <!-- Determines how to create the applied patches table-->
    <CreateAppliedPatchTable>
      if(not exists(select 1 from INFORMATION_SCHEMA.TABLES where TABLE_NAME='AppliedPatch'))
      begin
      CREATE TABLE [dbo].AppliedPatch(
      [PatchNumber] [varchar](50) NOT NULL,
      [Description] [varchar](400) NOT NULL,
      [AppliedBy] [nvarchar](50) NOT NULL,
      [AppliedDate] [datetime2](7) NOT NULL,
      CONSTRAINT [PK_AppliedPatch] PRIMARY KEY CLUSTERED
      (
      [PatchNumber] DESC
      )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 80) ON [PRIMARY]
      ) ON [PRIMARY]
      end
    </CreateAppliedPatchTable>
  </AppliedPatches>
</PatchStore>